﻿using System.Collections.Generic;
using PerceptiveMCAPI.Types;
//
namespace PerceptiveMCAPI
{
   internal static class listInterestGroupingAdd_Validator
   {
      // name -- required, string & unique
      internal static Api_ValidatorMessage name_valid( string name )
      {
         // ----------------- required check
         return Validator.string_value_required( name, "name" );
      }
      // type
      internal static Api_ValidatorMessage type_valid( EnumValues.grouping_type_field type )
      {
         if ( type == EnumValues.grouping_type_field.NotSpecified )
         {
            return Validator.FormatMsg( EnumValues.MessageLevel.Error, "type", "The grouping 'type' was not specified." );
         }
         return null;
      }
      // groups
      internal static Api_ValidatorMessage groups_valid( List<string> groups )
      {
         if ( groups.Count < 1 )
         {
            return Validator.FormatMsg( EnumValues.MessageLevel.Error, "groups", "At least one entry in 'groups' is required" );
         }
         return null;
      }
   }
}
